<template>
  <div class="app-container">
    <transition name="el-collapse-transition">
      <div v-show="!isShowDetail">
        <el-form
          v-show="showSearch"
          ref="queryForm"
          :model="orderParams"
          :inline="true"
          label-width="85px"
        >
          <el-form-item label="公司名称:" prop="compName">
            <el-input
              v-model="orderParams.compName"
              placeholder="请输入公司名称"
              clearable
              size="small"
              id="compName"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="报价单状态:" prop="status" label-width="100px">
            <el-select
              v-model="orderParams.status"
              placeholder="状态"
              clearable
              id="status"
              size="small"
            >
              <!-- <el-option
                v-for="item in statusOptions"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              /> -->
              <el-option
                  v-for="dict in quote_options"
                  :key="dict.dictValue"
                  :label="dict.dictLabel"
                  :value="dict.dictValue"
                >{{ dict.dictLabel }}
                </el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="项目名称:" prop="projectName">
            <el-input
              v-model="orderParams.projectName"
              placeholder="请输入项目名称"
              id="projectName"
              clearable
              size="small"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>

          <el-form-item>
            <el-button
              type="primary"
              icon="el-icon-search"
              size="mini"
              @click="handleQuery"
            >搜索</el-button>
            <el-button
              icon="el-icon-refresh"
              size="mini"
              @click="resetQuery"
            >重置</el-button>
          </el-form-item>
        </el-form>
        <el-row :gutter="10" class="mb8">
          <el-col :span="1.5">
            <el-button
              type="primary"
              plain
              icon="el-icon-plus"
              size="mini"
              @click="handleAdd"
            >新增</el-button>
          </el-col>
          <el-col :span="1.5">
            <el-button type="danger" plain 
            icon="el-icon-delete" size="mini" :disabled="multiple" 
            @click="handleDelete">删除
            </el-button>
          </el-col>
          <!-- <right-toolbar :show-search.sync="showSearch" @queryTable="getList" /> -->
        </el-row>

        <el-table
          v-loading="loading"
          :data="kqAllOrderList"
          height="650"
          stripe
          @selection-change="handleSelectionChange"
        >
        <el-table-column type="selection" width="50" align="center" />
          <el-table-column
            label="项目名称"
            align="left"
            prop="projectName"
            show-overflow-tooltip
            min-width="150"
          />
          <el-table-column
            label="公司名称"
            align="left"
            min-width="100"
            show-overflow-tooltip
          >
            <template slot-scope="scope">
              <el-button
                v-if="scope.row.compName"
                size="mini"
                type="text"
                icon="el-icon-document-copy"
                @click="CopyFileUrl(scope.row.compName)"
              />
              <el-link
                target="_blank"
                :href="
                  'https://www.tianyancha.com/search?key=' + scope.row.compName
                "
              >
                {{ scope.row.compName }}
              </el-link>
            </template>
          </el-table-column>
          <el-table-column
            prop="dealNum"
            label="成交额(万)"
            show-overflow-tooltip
          >
            <template slot-scope="scope">
              {{ scope.row.allItemTotalNum / 10000 }}
            </template>
          </el-table-column>
          <el-table-column
            label="状态"
            align="center"
            width="150"
            class-name="small-padding"
          >
            <template slot-scope="scope">
              {{ scope.row.status  }}
            </template>
          </el-table-column>
          <el-table-column
            label="总折扣"
            align="center"
            prop="totalDiscount"
            show-overflow-tooltip
          />
          <el-table-column
            label="创建时间"
            align="center"
            prop="create_datetime"
            show-overflow-tooltip
          />
          <el-table-column
            label="操作"
            align="center"
            width="150"
            class-name="small-padding"
          >
            <template slot-scope="scope">
              <el-button
                type="primary"
                icon="el-icon-edit"
                circle
                @click="handleUpdate(scope.row)"
              ></el-button>
              <el-button
                type="primary"
                icon="el-icon-delete"
                circle
                @click="handleDelete(scope.row)"
              ></el-button>
            </template>
          </el-table-column>
        </el-table>
        <pagination
          v-show="total > 0"
          :total="total"
          :page.sync="orderParams.pageNum"
          :limit.sync="orderParams.pageSize"
          @pagination="getList"
        />
      </div>
    </transition>
    <transition name="el-collapse-transition">
      <div v-show="isShowDetail">
        <el-form ref="priceForm" :model="priceForm" :rules="rules">
          <el-header height="40px">
            <el-row type="flex" class="row-bg">
              <el-col :span="1">
                <el-button
                  type="primary"
                  icon="el-icon-back"
                  plain
                  circle
                  @click="handleback"
                >
                </el-button>
              </el-col>
              <el-col :span="19">

              </el-col>

              <el-col :span="4">
                <el-slider
                  v-model="showTableNum"
                  input-size="mini"
                  :min="5"
                  :max="15"
                  @change="handleChangeNum"
                ></el-slider>
              </el-col>
            </el-row>
          </el-header>
          <el-main class="main">
            <el-row>
              <el-col :span="24">
                <el-input
                  v-model="priceForm.projectName"
                  class="zhouxf"
                  placeholder="请输入项目名称"
                  clearable
                  size="small"
                />
              </el-col>
            </el-row>
            <el-row class="price_desc">
              <el-select
                v-model="priceForm.compName"
                class="compName"
                filterable
                remote
                clearable
                placeholder="请输入公司名称"
                :remote-method="remoteMethod"
                @change="handleChangeCompNameFunc"
              >
                <el-option
                  v-for="item in compNameOptions"
                  :id="item.id"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
            </el-row>
            <el-row class="price_desc thanks">
              感谢惠顾，现将贵公司所需产品报价如下：
            </el-row>
            <el-row class="price_form">
              <el-col :span="sp1"> 序号 </el-col>
              <el-col :span="sp2"> 产品名称 </el-col>
              <el-col :span="sp3"> 型号 </el-col>
              <el-col :span="sp4">Q(m3/h)</el-col>
              <el-col :span="sp5"> H(m) </el-col>
              <el-col :span="sp6"> N(kW) </el-col>
              <el-col :span="sp7"> 数量 </el-col>
              <el-col v-show="isHide" :span="sp8" style="background-color: red">
                670
              </el-col>
              <el-col :span="sp9"> 单价 </el-col>
              <el-col :span="sp10"> 金额 </el-col>
              <el-col :span="sp11" class="price_last"> 备注 </el-col>
            </el-row>
            <el-row class="price_table">
              <el-col :span="sp1">
                <span> 1</span>
              </el-col>
              <el-col :span="sp2">
                <el-input
                  v-model="priceJsonObj.itemName1"
                  size="small"
                />
              </el-col>
              <el-col :span="sp3">
                <el-input
                  v-model="priceJsonObj.itemType1"
                  size="small"
                />
              </el-col>
              <el-col :span="sp4">
                <el-input
                  v-model="priceJsonObj.itemFlow1"
                  size="small"
                />
              </el-col>
              <el-col :span="sp5">
                <el-input
                  v-model="priceJsonObj.itemHeight1"
                  size="small"
                />
              </el-col>
              <el-col :span="sp6">
                <el-input
                  v-model="priceJsonObj.itemPower1"
                  size="small"
                />
              </el-col>
              <el-col :span="sp7">
                <el-input v-model="priceJsonObj.itemNum1" size="small" />
              </el-col>
              <el-col v-show="isHide" :span="sp8">
                <el-input
                  v-model="priceJsonObj.originalPrice1"
                  size="small"
                />
              </el-col>
              <el-col :span="sp9">
                <el-input v-model="priceJsonObj.itemSingle1" size="small" />
              </el-col>
              <el-col :span="sp10">
                <el-input v-model="priceJsonObj.itemTotal1" size="small" />
              </el-col>
              <el-col :span="sp11" class="price_last">
                <el-input
                  v-model="priceJsonObj.itemDesc1"
                  size="small"
                />
              </el-col>
            </el-row>
            <el-row class="price_table">
              <el-col :span="sp1">
                <span> 2</span>
              </el-col>
              <el-col :span="sp2">
                <el-input
                  v-model="priceJsonObj.itemName2"
                  size="small"
                />
              </el-col>
              <el-col :span="sp3">
                <el-input
                  v-model="priceJsonObj.itemType2"
                  size="small"
                />
              </el-col>
              <el-col :span="sp4">
                <el-input
                  v-model="priceJsonObj.itemFlow2"
                  size="small"
                />
              </el-col>
              <el-col :span="sp5">
                <el-input
                  v-model="priceJsonObj.itemHeight2"
                  size="small"
                />
              </el-col>
              <el-col :span="sp6">
                <el-input
                  v-model="priceJsonObj.itemPower2"
                  size="small"
                />
              </el-col>
              <el-col :span="sp7">
                <el-input v-model="priceJsonObj.itemNum2" size="small" />
              </el-col>
              <el-col v-show="isHide" :span="sp8">
                <el-input
                  v-model="priceJsonObj.originalPrice2"
                  size="small"
                />
              </el-col>
              <el-col :span="sp9">
                <el-input v-model="priceJsonObj.itemSingle2" size="small" />
              </el-col>
              <el-col :span="sp10">
                <el-input v-model="priceJsonObj.itemTotal2" size="small" />
              </el-col>
              <el-col :span="sp11" class="price_last">
                <el-input
                  v-model="priceJsonObj.itemDesc2"
                  size="small"
                />
              </el-col>
            </el-row>
            <el-row class="price_table">
              <el-col :span="sp1">
                <span> 3</span>
              </el-col>
              <el-col :span="sp2">
                <el-input
                  v-model="priceJsonObj.itemName3"
                  size="small"
                />
              </el-col>
              <el-col :span="sp3">
                <el-input
                  v-model="priceJsonObj.itemType3"
                  size="small"
                />
              </el-col>
              <el-col :span="sp4">
                <el-input
                  v-model="priceJsonObj.itemFlow3"
                  size="small"
                />
              </el-col>
              <el-col :span="sp5">
                <el-input
                  v-model="priceJsonObj.itemHeight3"
                  size="small"
                />
              </el-col>
              <el-col :span="sp6">
                <el-input
                  v-model="priceJsonObj.itemPower3"
                  size="small"
                />
              </el-col>
              <el-col :span="sp7">
                <el-input v-model="priceJsonObj.itemNum3" size="small" />
              </el-col>
              <el-col v-show="isHide" :span="sp8">
                <el-input
                  v-model="priceJsonObj.originalPrice3"
                  size="small"
                />
              </el-col>
              <el-col :span="sp9">
                <el-input v-model="priceJsonObj.itemSingle3" size="small" />
              </el-col>
              <el-col :span="sp10">
                <el-input v-model="priceJsonObj.itemTotal3" size="small" />
              </el-col>
              <el-col :span="sp11" class="price_last">
                <el-input
                  v-model="priceJsonObj.itemDesc3"
                  size="small"
                />
              </el-col>
            </el-row>
            <el-row class="price_table">
              <el-col :span="sp1">
                <span> 4</span>
              </el-col>
              <el-col :span="sp2">
                <el-input
                  v-model="priceJsonObj.itemName4"
                  size="small"
                />
              </el-col>
              <el-col :span="sp3">
                <el-input
                  v-model="priceJsonObj.itemType4"
                  size="small"
                />
              </el-col>
              <el-col :span="sp4">
                <el-input
                  v-model="priceJsonObj.itemFlow4"
                  size="small"
                />
              </el-col>
              <el-col :span="sp5">
                <el-input
                  v-model="priceJsonObj.itemHeight4"
                  size="small"
                />
              </el-col>
              <el-col :span="sp6">
                <el-input
                  v-model="priceJsonObj.itemPower4"
                  size="small"
                />
              </el-col>
              <el-col :span="sp7">
                <el-input v-model="priceJsonObj.itemNum4" size="small" />
              </el-col>
              <el-col v-show="isHide" :span="sp8">
                <el-input
                  v-model="priceJsonObj.originalPrice4"
                  size="small"
                />
              </el-col>
              <el-col :span="sp9">
                <el-input v-model="priceJsonObj.itemSingle4" size="small" />
              </el-col>
              <el-col :span="sp10">
                <el-input v-model="priceJsonObj.itemTotal4" size="small" />
              </el-col>
              <el-col :span="sp11" class="price_last">
                <el-input
                  v-model="priceJsonObj.itemDesc4"
                  size="small"
                />
              </el-col>
            </el-row>
            <el-row class="price_table">
              <el-col :span="sp1">
                <span> 5</span>
              </el-col>
              <el-col :span="sp2">
                <el-input
                  v-model="priceJsonObj.itemName5"
                  size="small"
                />
              </el-col>
              <el-col :span="sp3">
                <el-input
                  v-model="priceJsonObj.itemType5"
                  size="small"
                />
              </el-col>
              <el-col :span="sp4">
                <el-input
                  v-model="priceJsonObj.itemFlow5"
                  size="small"
                />
              </el-col>
              <el-col :span="sp5">
                <el-input
                  v-model="priceJsonObj.itemHeight5"
                  size="small"
                />
              </el-col>
              <el-col :span="sp6">
                <el-input
                  v-model="priceJsonObj.itemPower5"
                  size="small"
                />
              </el-col>
              <el-col :span="sp7">
                <el-input v-model="priceJsonObj.itemNum5" size="small" />
              </el-col>
              <el-col v-show="isHide" :span="sp8">
                <el-input
                  v-model="priceJsonObj.originalPrice5"
                  size="small"
                />
              </el-col>
              <el-col :span="sp9">
                <el-input v-model="priceJsonObj.itemSingle5" size="small" />
              </el-col>
              <el-col :span="sp10">
                <el-input v-model="priceJsonObj.itemTotal5" size="small" />
              </el-col>
              <el-col :span="sp11" class="price_last">
                <el-input
                  v-model="priceJsonObj.itemDesc5"
                  size="small"
                />
              </el-col>
            </el-row>
            <el-row v-show="isShow6" class="price_table">
              <el-col :span="sp1">
                <span> 6</span>
              </el-col>
              <el-col :span="sp2">
                <el-input
                  v-model="priceJsonObj.itemName6"
                  size="small"
                />
              </el-col>
              <el-col :span="sp3">
                <el-input
                  v-model="priceJsonObj.itemType6"
                  size="small"
                />
              </el-col>
              <el-col :span="sp4">
                <el-input
                  v-model="priceJsonObj.itemFlow6"
                  size="small"
                />
              </el-col>
              <el-col :span="sp5">
                <el-input
                  v-model="priceJsonObj.itemHeight6"
                  size="small"
                />
              </el-col>
              <el-col :span="sp6">
                <el-input
                  v-model="priceJsonObj.itemPower6"
                  size="small"
                />
              </el-col>
              <el-col :span="sp7">
                <el-input v-model="priceJsonObj.itemNum6" size="small" />
              </el-col>
              <el-col v-show="isHide" :span="sp8">
                <el-input
                  v-model="priceJsonObj.originalPrice6"
                  size="small"
                />
              </el-col>
              <el-col :span="sp9">
                <el-input v-model="priceJsonObj.itemSingle6" size="small" />
              </el-col>
              <el-col :span="sp10">
                <el-input v-model="priceJsonObj.itemTotal6" size="small" />
              </el-col>
              <el-col :span="sp11" class="price_last">
                <el-input
                  v-model="priceJsonObj.itemDesc6"
                  size="small"
                />
              </el-col>
            </el-row>
            <el-row v-show="isShow7" class="price_table">
              <el-col :span="sp1">
                <span> 7</span>
              </el-col>
              <el-col :span="sp2">
                <el-input
                  v-model="priceJsonObj.itemName7"
                  size="small"
                />
              </el-col>
              <el-col :span="sp3">
                <el-input
                  v-model="priceJsonObj.itemType7"
                  size="small"
                />
              </el-col>
              <el-col :span="sp4">
                <el-input
                  v-model="priceJsonObj.itemFlow7"
                  size="small"
                />
              </el-col>
              <el-col :span="sp5">
                <el-input
                  v-model="priceJsonObj.itemHeight7"
                  size="small"
                />
              </el-col>
              <el-col :span="sp6">
                <el-input
                  v-model="priceJsonObj.itemPower7"
                  size="small"
                />
              </el-col>
              <el-col :span="sp7">
                <el-input v-model="priceJsonObj.itemNum7" size="small" />
              </el-col>
              <el-col v-show="isHide" :span="sp8">
                <el-input
                  v-model="priceJsonObj.originalPrice7"
                  size="small"
                />
              </el-col>
              <el-col :span="sp9">
                <el-input v-model="priceJsonObj.itemSingle7" size="small" />
              </el-col>
              <el-col :span="sp10">
                <el-input v-model="priceJsonObj.itemTotal7" size="small" />
              </el-col>
              <el-col :span="sp11" class="price_last">
                <el-input
                  v-model="priceJsonObj.itemDesc7"
                  size="small"
                />
              </el-col>
            </el-row>
            <el-row v-show="isShow8" class="price_table">
              <el-col :span="sp1">
                <span> 8</span>
              </el-col>
              <el-col :span="sp2">
                <el-input
                  v-model="priceJsonObj.itemName8"
                  size="small"
                />
              </el-col>
              <el-col :span="sp3">
                <el-input
                  v-model="priceJsonObj.itemType8"
                  size="small"
                />
              </el-col>
              <el-col :span="sp4">
                <el-input
                  v-model="priceJsonObj.itemFlow8"
                  size="small"
                />
              </el-col>
              <el-col :span="sp5">
                <el-input
                  v-model="priceJsonObj.itemHeight8"
                  size="small"
                />
              </el-col>
              <el-col :span="sp6">
                <el-input
                  v-model="priceJsonObj.itemPower8"
                  size="small"
                />
              </el-col>
              <el-col :span="sp7">
                <el-input v-model="priceJsonObj.itemNum8" size="small" />
              </el-col>
              <el-col v-show="isHide" :span="sp8">
                <el-input
                  v-model="priceJsonObj.originalPrice8"
                  size="small"
                />
              </el-col>
              <el-col :span="sp9">
                <el-input v-model="priceJsonObj.itemSingle8" size="small" />
              </el-col>
              <el-col :span="sp10">
                <el-input v-model="priceJsonObj.itemTotal8" size="small" />
              </el-col>
              <el-col :span="sp11" class="price_last">
                <el-input
                  v-model="priceJsonObj.itemDesc8"
                  size="small"
                />
              </el-col>
            </el-row>
            <el-row v-show="isShow9" class="price_table">
              <el-col :span="sp1">
                <span> 9</span>
              </el-col>
              <el-col :span="sp2">
                <el-input
                  v-model="priceJsonObj.itemName9"
                  size="small"
                />
              </el-col>
              <el-col :span="sp3">
                <el-input
                  v-model="priceJsonObj.itemType9"
                  size="small"
                />
              </el-col>
              <el-col :span="sp4">
                <el-input
                  v-model="priceJsonObj.itemFlow9"
                  size="small"
                />
              </el-col>
              <el-col :span="sp5">
                <el-input
                  v-model="priceJsonObj.itemHeight9"
                  size="small"
                />
              </el-col>
              <el-col :span="sp6">
                <el-input
                  v-model="priceJsonObj.itemPower9"
                  size="small"
                />
              </el-col>
              <el-col :span="sp7">
                <el-input v-model="priceJsonObj.itemNum9" size="small" />
              </el-col>
              <el-col v-show="isHide" :span="sp8">
                <el-input
                  v-model="priceJsonObj.originalPrice9"
                  size="small"
                />
              </el-col>
              <el-col :span="sp9">
                <el-input v-model="priceJsonObj.itemSingle9" size="small" />
              </el-col>
              <el-col :span="sp10">
                <el-input v-model="priceJsonObj.itemTotal9" size="small" />
              </el-col>
              <el-col :span="sp11" class="price_last">
                <el-input
                  v-model="priceJsonObj.itemDesc9"
                  size="small"
                />
              </el-col>
            </el-row>
            <el-row v-show="isShow10" class="price_table">
              <el-col :span="sp1">
                <span> 10</span>
              </el-col>
              <el-col :span="sp2">
                <el-input
                  v-model="priceJsonObj.itemName10"
                  size="small"
                />
              </el-col>
              <el-col :span="sp3">
                <el-input
                  v-model="priceJsonObj.itemType10"
                  size="small"
                />
              </el-col>
              <el-col :span="sp4">
                <el-input
                  v-model="priceJsonObj.itemFlow10"
                  size="small"
                />
              </el-col>
              <el-col :span="sp5">
                <el-input
                  v-model="priceJsonObj.itemHeight10"
                  size="small"
                />
              </el-col>
              <el-col :span="sp6">
                <el-input
                  v-model="priceJsonObj.itemPower10"
                  size="small"
                />
              </el-col>
              <el-col :span="sp7">
                <el-input
                  v-model="priceJsonObj.itemNum10"
                  size="small"
                />
              </el-col>
              <el-col v-show="isHide" :span="sp8">
                <el-input
                  v-model="priceJsonObj.originalPrice10"
                  size="small"
                />
              </el-col>
              <el-col :span="sp9">
                <el-input v-model="priceJsonObj.itemSingle10" size="small" />
              </el-col>
              <el-col :span="sp10">
                <el-input v-model="priceJsonObj.itemTotal10" size="small" />
              </el-col>
              <el-col :span="sp11" class="price_last">
                <el-input
                  v-model="priceJsonObj.itemDesc10"
                  size="small"
                />
              </el-col>
            </el-row>
            <el-row v-show="isShow11" class="price_table">
              <el-col :span="sp1">
                <span> 11</span>
              </el-col>
              <el-col :span="sp2">
                <el-input
                  v-model="priceJsonObj.itemName11"
                  size="small"
                />
              </el-col>
              <el-col :span="sp3">
                <el-input
                  v-model="priceJsonObj.itemType11"
                  size="small"
                />
              </el-col>
              <el-col :span="sp4">
                <el-input
                  v-model="priceJsonObj.itemFlow11"
                  size="small"
                />
              </el-col>
              <el-col :span="sp5">
                <el-input
                  v-model="priceJsonObj.itemHeight11"
                  size="small"
                />
              </el-col>
              <el-col :span="sp6">
                <el-input
                  v-model="priceJsonObj.itemPower11"
                  size="small"
                />
              </el-col>
              <el-col :span="sp7">
                <el-input
                  v-model="priceJsonObj.itemNum11"
                  size="small"
                />
              </el-col>
              <el-col v-show="isHide" :span="sp8">
                <el-input
                  v-model="priceJsonObj.originalPrice11"
                  size="small"
                />
              </el-col>
              <el-col :span="sp9">
                <el-input v-model="priceJsonObj.itemSingle11" size="small" />
              </el-col>
              <el-col :span="sp10">
                <el-input v-model="priceJsonObj.itemTotal11" size="small" />
              </el-col>
              <el-col :span="sp11" class="price_last">
                <el-input
                  v-model="priceJsonObj.itemDesc11"
                  size="small"
                />
              </el-col>
            </el-row>
            <el-row v-show="isShow12" class="price_table">
              <el-col :span="sp1">
                <span> 12</span>
              </el-col>
              <el-col :span="sp2">
                <el-input
                  v-model="priceJsonObj.itemName12"
                  size="small"
                />
              </el-col>
              <el-col :span="sp3">
                <el-input
                  v-model="priceJsonObj.itemType12"
                  size="small"
                />
              </el-col>
              <el-col :span="sp4">
                <el-input
                  v-model="priceJsonObj.itemFlow12"
                  size="small"
                />
              </el-col>
              <el-col :span="sp5">
                <el-input
                  v-model="priceJsonObj.itemHeight12"
                  size="small"
                />
              </el-col>
              <el-col :span="sp6">
                <el-input
                  v-model="priceJsonObj.itemPower12"
                  size="small"
                />
              </el-col>
              <el-col :span="sp7">
                <el-input
                  v-model="priceJsonObj.itemNum12"
                  size="small"
                />
              </el-col>
              <el-col v-show="isHide" :span="sp8">
                <el-input
                  v-model="priceJsonObj.originalPrice12"
                  size="small"
                />
              </el-col>
              <el-col :span="sp9">
                <el-input v-model="priceJsonObj.itemSingle12" size="small" />
              </el-col>
              <el-col :span="sp10">
                <el-input v-model="priceJsonObj.itemTotal12" size="small" />
              </el-col>
              <el-col :span="sp11" class="price_last">
                <el-input
                  v-model="priceJsonObj.itemDesc12"
                  size="small"
                />
              </el-col>
            </el-row>
            <el-row v-show="isShow13" class="price_table">
              <el-col :span="sp1">
                <span> 13</span>
              </el-col>
              <el-col :span="sp2">
                <el-input
                  v-model="priceJsonObj.itemName13"
                  size="small"
                />
              </el-col>
              <el-col :span="sp3">
                <el-input
                  v-model="priceJsonObj.itemType13"
                  size="small"
                />
              </el-col>
              <el-col :span="sp4">
                <el-input
                  v-model="priceJsonObj.itemFlow13"
                  size="small"
                />
              </el-col>
              <el-col :span="sp5">
                <el-input
                  v-model="priceJsonObj.itemHeight13"
                  size="small"
                />
              </el-col>
              <el-col :span="sp6">
                <el-input
                  v-model="priceJsonObj.itemPower13"
                  size="small"
                />
              </el-col>
              <el-col :span="sp7">
                <el-input
                  v-model="priceJsonObj.itemNum13"
                  size="small"
                />
              </el-col>
              <el-col v-show="isHide" :span="sp8">
                <el-input
                  v-model="priceJsonObj.originalPrice13"
                  size="small"
                />
              </el-col>
              <el-col :span="sp9">
                <el-input v-model="priceJsonObj.itemSingle13" size="small" />
              </el-col>
              <el-col :span="sp10">
                <el-input v-model="priceJsonObj.itemTotal13" size="small" />
              </el-col>
              <el-col :span="sp11" class="price_last">
                <el-input
                  v-model="priceJsonObj.itemDesc13"
                  size="small"
                />
              </el-col>
            </el-row>
            <el-row v-show="isShow14" class="price_table">
              <el-col :span="sp1">
                <span> 14</span>
              </el-col>
              <el-col :span="sp2">
                <el-input
                  v-model="priceJsonObj.itemName14"
                  size="small"
                />
              </el-col>
              <el-col :span="sp3">
                <el-input
                  v-model="priceJsonObj.itemType14"
                  size="small"
                />
              </el-col>
              <el-col :span="sp4">
                <el-input
                  v-model="priceJsonObj.itemFlow14"
                  size="small"
                />
              </el-col>
              <el-col :span="sp5">
                <el-input
                  v-model="priceJsonObj.itemHeight14"
                  size="small"
                />
              </el-col>
              <el-col :span="sp6">
                <el-input
                  v-model="priceJsonObj.itemPower14"
                  size="small"
                />
              </el-col>
              <el-col :span="sp7">
                <el-input
                  v-model="priceJsonObj.itemNum14"
                  size="small"
                />
              </el-col>
              <el-col v-show="isHide" :span="sp8">
                <el-input
                  v-model="priceJsonObj.originalPrice14"
                  size="small"
                />
              </el-col>
              <el-col :span="sp9">
                <el-input v-model="priceJsonObj.itemSingle14" size="small" />
              </el-col>
              <el-col :span="sp10">
                <el-input v-model="priceJsonObj.itemTotal14" size="small" />
              </el-col>
              <el-col :span="sp11" class="price_last">
                <el-input
                  v-model="priceJsonObj.itemDesc14"
                  size="small"
                />
              </el-col>
            </el-row>
            <el-row v-show="isShow15" class="price_table">
              <el-col :span="sp1">
                <span> 15</span>
              </el-col>
              <el-col :span="sp2">
                <el-input
                  v-model="priceJsonObj.itemName15"
                  size="small"
                />
              </el-col>
              <el-col :span="sp3">
                <el-input
                  v-model="priceJsonObj.itemType15"
                  size="small"
                />
              </el-col>
              <el-col :span="sp4">
                <el-input
                  v-model="priceJsonObj.itemFlow15"
                  size="small"
                />
              </el-col>
              <el-col :span="sp5">
                <el-input
                  v-model="priceJsonObj.itemHeight15"
                  size="small"
                />
              </el-col>
              <el-col :span="sp6">
                <el-input
                  v-model="priceJsonObj.itemPower15"
                  size="small"
                />
              </el-col>
              <el-col :span="sp7">
                <el-input
                  v-model="priceJsonObj.itemNum15"
                  size="small"
                />
              </el-col>
              <el-col v-show="isHide" :span="sp8">
                <el-input
                  v-model="priceJsonObj.originalPrice15"
                  size="small"
                />
              </el-col>
              <el-col :span="sp9">
                <el-input v-model="priceJsonObj.itemSingle15" size="small" />
              </el-col>
              <el-col :span="sp10">
                <el-input v-model="priceJsonObj.itemTotal15" size="small" />
              </el-col>
              <el-col :span="sp11" class="price_last">
                <el-input
                  v-model="priceJsonObj.itemDesc15"
                  size="small"
                />
              </el-col>
            </el-row>
            <el-row class="total_table">
              <el-col :span="7">
                <span> 合计人民币金额（小写）：</span>
              </el-col>
              <el-col :span="4">
                <span>
                  <el-input
                    v-model="priceForm.allItemTotalNum"
                    size="small"
                  /></span>
              </el-col>
              <el-col :span="5">
                <span> 合计人民币金额（大写）：</span>
              </el-col>
              <el-col v-show="isHide" class="hideCol" :span="1"> </el-col>
              <el-col :span="7" class="price_last">
                <span>
                  <el-input
                    v-model="priceForm.allItemChinaNum"
                    size="small"
                  /></span>
              </el-col>
            </el-row>
            <el-row class="bottom_table">
              <el-col :span="11">
                <span> 报价人：周贤飞</span>
              </el-col>
              <el-col :span="8">
                <span> 联系电话：15268541858</span>
              </el-col>
              <el-col :span="1.5">
                <span> 报价时间：</span>
              </el-col>
              <el-col :span="2" class="timeStyle">
                <el-input v-model="priceForm.dateTime" size="small" />
              </el-col>

            </el-row>

            <el-divider />
            <el-row type="flex" class="transfee">
              <el-col :span="5">
                <el-form-item
                  label="基本折扣："
                  prop="baseDiscount"
                  label-width="100px"
                >
                  <el-select
                    v-model="priceForm.baseDiscount"
                    placeholder="基本折扣"
                    id="baseDiscount"
                    clearable
                    size="small"
                    @change="handleDiscountFunc"
                  >
                    <el-option
                      v-for="item in baseOptions"
                      :key="item.value"
                      :label="item.label"
                      :value="item.value"
                    />
                  </el-select>
                </el-form-item>
              </el-col>

              <el-col :span="5">
                <el-form-item
                  label="运费折扣："
                  prop="transDiscount"
                  label-width="100px"
                >
                  <el-select
                    v-model="priceForm.transDiscount"
                    id="transDiscount"
                    placeholder="运费折扣"
                    clearable
                    size="small"
                    @change="handleDiscountFunc"
                  >
                    <el-option
                      v-for="item in addressOptions"
                      :key="item.value"
                      :label="item.label"
                      :value="item.value"
                    />
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="5">
                <el-form-item
                  label="总折扣："
                  prop="totalDiscount"
                  label-width="100px"
                >
                  <el-input v-model="priceForm.totalDiscount" id="totalDiscount" disabled>
                  </el-input>
                </el-form-item>
              </el-col>
              <el-col :span="5">
                <el-form-item label="系数：" prop="factor" label-width="100px">
                  <el-input v-model="factor" id="factor"> </el-input></el-form-item>
              </el-col>
            </el-row>
            <el-row class="transfee2">

              <el-col :span="5">
                <el-form-item label="670总价:" prop="allItemTotalNum670" label-width="100px">
                  <el-input v-model="priceForm.allItemTotalNum670" id="allItemTotalNum670"> </el-input></el-form-item>
              </el-col>
              <el-col :span="5">
                <el-form-item label="运费价格:" prop="allTransportPrice" label-width="100px">
                  <el-input v-model="priceForm.allTransportPrice"  id="allTransportPrice"> </el-input></el-form-item>
              </el-col>
              <el-col :span="5">
                <el-form-item label="报价单状态:" prop="status" label-width="100px">
                  <el-select
                    v-model="priceForm.status"
                    placeholder="状态"
                    id="status"
                    clearable
                    size="small"
                  >
                    <!-- <el-option
                      v-for="item in statusOptions"
                      :key="item.value"
                      :label="item.label"
                      :value="item.value"
                    /> -->
                    <el-option
                  v-for="dict in quote_options"
                  :key="dict.dictValue"
                  :label="dict.dictLabel"
                  :value="dict.dictValue"
                >{{ dict.dictLabel }}
                </el-option>
                  </el-select>
                </el-form-item>
              </el-col>

            </el-row>
            <el-row class="transfee2">
              <el-col :span="5">
                <el-form-item label="收获人:" prop="receiver" label-width="100px">
                  <el-input v-model="priceForm.receiver"  id="receiver"> </el-input></el-form-item>
              </el-col>
              <el-col :span="5">
                <el-form-item label="收货人号码:" prop="recNumber" label-width="100px">
                  <el-input v-model="priceForm.recNumber" id="recNumber"> </el-input></el-form-item>
              </el-col>
              <el-col :span="5">
                <el-form-item label="收货人地址:" prop="recAddr" label-width="100px">
                  <el-input v-model="priceForm.recAddr" id="recAddr"> </el-input></el-form-item>
              </el-col>

            </el-row>
            <el-row class="transfee2">
              <el-col :span="5">
                <el-form-item label="货 期:" prop="prodTime" label-width="100px">
                  <el-input v-model="priceForm.prodTime" id="prodTime"> </el-input></el-form-item>
              </el-col>
              <el-col :span="5">
                <el-form-item label-width="100px" label="期望时间:" prop="day">
                  <el-date-picker v-model="priceForm.day" type="date" id="day" placeholder="请选择期望送达时间" />
                </el-form-item>
              </el-col>
              <el-col :span="5">
                <el-form-item label="物流信息:" prop="logInfo" label-width="100px">
                  <el-input v-model="priceForm.logInfo"  id="logInfo"> </el-input></el-form-item>
              </el-col>

            </el-row>
            <el-row class="save_table">
              <el-button @click="simpleReset">重 置</el-button>
              <el-button @click="handleSaveFunc">保 存</el-button>
              <el-button type="primary" @click="hideData">{{ buttonDesc }}</el-button>
              <el-button type="primary" @click="handleCalc">原始报价</el-button>
              <el-button type="primary" :disabled="isBtnDisable" @click="handleCalForTech">系数报价</el-button>
            </el-row>
          </el-main>
        </el-form>
      </div>
    </transition>
  </div>
</template>

<script>
import { listKqAllInfos } from "@/api/work/work";
import {
  addKqPriceInfo,
  updateKqPriceInfo,
  delKqPriceInfo,
  listKqAllPriceInfos
} from "@/api/work/kqPriceInfos";
export default {
  name: "Work",
  data() {
    return {
      // 遮罩层
      loading: true,
      canSave: true,
      sp1: 1,
      sp2: 3,
      sp3: 3,
      sp4: 2,
      sp5: 2,
      sp6: 2,
      sp7: 1,
      sp8: 1,
      sp9: 2,
      sp10: 2,
      sp11: 5,
      // 系数
      factor: 1.15,
      dateTime: undefined,
      isBtnDisable: false,
      isAddMode: true,
      // 搜索公司名称加载
      // compNameLoading: true,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      showTableNum: 5,
      // 岗位表格数据
      kqAllOrderList: [],
      isShowDetail: false,
      isHide: true,
      isShow6: false,
      isShow7: false,
      isShow8: false,
      isShow9: false,
      isShow10: false,
      isShow11: false,
      isShow12: false,
      isShow13: false,
      isShow14: false,
      isShow15: false,
      isShow16: false,
      isShow17: false,
      isShow18: false,
      isShow19: false,
      isShow20: false,
      buttonDesc: "隐藏670",
      priceForm: {
        kqId: undefined,
        projectName: undefined,
        allItemTotalNum: undefined,
        allItemTotalNum670: undefined,
        allTransportPrice: undefined,
        allItemChinaNum: undefined,
        totalDiscount: undefined,
        dateTime: undefined,
        baseJson: undefined
      },
      priceJsonObj: {
        itemName1: undefined,
        itemName2: undefined,
        itemName3: undefined,
        itemName4: undefined,
        itemName5: undefined,
        itemName6: undefined,
        itemName7: undefined,
        itemName8: undefined,
        itemName9: undefined,
        itemName10: undefined,
        itemName11: undefined,
        itemName12: undefined,
        itemName13: undefined,
        itemName14: undefined,
        itemName15: undefined,
        itemType1: undefined,
        itemType2: undefined,
        itemType3: undefined,
        itemType4: undefined,
        itemType5: undefined,
        itemType6: undefined,
        itemType7: undefined,
        itemType8: undefined,
        itemType9: undefined,
        itemType10: undefined,
        itemType11: undefined,
        itemType12: undefined,
        itemType13: undefined,
        itemType14: undefined,
        itemType15: undefined,
        itemFlow1: undefined,
        itemFlow2: undefined,
        itemFlow3: undefined,
        itemFlow4: undefined,
        itemFlow5: undefined,
        itemFlow6: undefined,
        itemFlow7: undefined,
        itemFlow8: undefined,
        itemFlow9: undefined,
        itemFlow10: undefined,
        itemFlow11: undefined,
        itemFlow12: undefined,
        itemFlow13: undefined,
        itemFlow14: undefined,
        itemFlow15: undefined,
        itemHeight1: undefined,
        itemHeight2: undefined,
        itemHeight3: undefined,
        itemHeight4: undefined,
        itemHeight5: undefined,
        itemHeight6: undefined,
        itemHeight7: undefined,
        itemHeight8: undefined,
        itemHeight9: undefined,
        itemHeight10: undefined,
        itemHeight11: undefined,
        itemHeight12: undefined,
        itemHeight13: undefined,
        itemHeight14: undefined,
        itemHeight15: undefined,
        itemPower1: undefined,
        itemPower2: undefined,
        itemPower3: undefined,
        itemPower4: undefined,
        itemPower5: undefined,
        itemPower6: undefined,
        itemPower7: undefined,
        itemPower8: undefined,
        itemPower9: undefined,
        itemPower10: undefined,
        itemPower11: undefined,
        itemPower12: undefined,
        itemPower13: undefined,
        itemPower14: undefined,
        itemPower15: undefined,
        itemNum1: undefined,
        itemNum2: undefined,
        itemNum3: undefined,
        itemNum4: undefined,
        itemNum5: undefined,
        itemNum6: undefined,
        itemNum7: undefined,
        itemNum8: undefined,
        itemNum9: undefined,
        itemNum10: undefined,
        itemNum11: undefined,
        itemNum12: undefined,
        itemNum13: undefined,
        itemNum14: undefined,
        itemNum15: undefined,
        originalPrice1: undefined,
        originalPrice2: undefined,
        originalPrice3: undefined,
        originalPrice4: undefined,
        originalPrice5: undefined,
        originalPrice6: undefined,
        originalPrice7: undefined,
        originalPrice8: undefined,
        originalPrice9: undefined,
        originalPrice10: undefined,
        originalPrice11: undefined,
        originalPrice12: undefined,
        originalPrice13: undefined,
        originalPrice14: undefined,
        originalPrice15: undefined,
        itemSingle1: undefined,
        itemSingle2: undefined,
        itemSingle3: undefined,
        itemSingle4: undefined,
        itemSingle5: undefined,
        itemSingle6: undefined,
        itemSingle7: undefined,
        itemSingle8: undefined,
        itemSingle9: undefined,
        itemSingle10: undefined,
        itemSingle11: undefined,
        itemSingle12: undefined,
        itemSingle13: undefined,
        itemSingle14: undefined,
        itemSingle15: undefined,
        itemTotal1: undefined,
        itemTotal2: undefined,
        itemTotal3: undefined,
        itemTotal4: undefined,
        itemTotal5: undefined,
        itemTotal6: undefined,
        itemTotal7: undefined,
        itemTotal8: undefined,
        itemTotal9: undefined,
        itemTotal10: undefined,
        itemTotal11: undefined,
        itemTotal12: undefined,
        itemTotal13: undefined,
        itemTotal14: undefined,
        itemTotal15: undefined,
        itemDesc1: undefined,
        itemDesc2: undefined,
        itemDesc3: undefined,
        itemDesc4: undefined,
        itemDesc5: undefined,
        itemDesc6: undefined,
        itemDesc7: undefined,
        itemDesc8: undefined,
        itemDesc9: undefined,
        itemDesc10: undefined,
        itemDesc11: undefined,
        itemDesc12: undefined,
        itemDesc13: undefined,
        itemDesc14: undefined,
        itemDesc15: undefined
      },
      kqAllInfoList: [],
      compNameOptions: [],
      // 查询参数
      orderParams: {
        pageNum: 1,
        pageSize: 10,
        compName: undefined
        // collaborator: undefined
        // city: undefined,
        // district: undefined
      },
      // ---------------- option---------------------
      quote_options:[],
      baseOptions: [
        {
          value: "0.42",
          label: "42折【配套最低折扣】"
        },
        {
          value: "0.43",
          label: "43折"
        },
        {
          value: "0.44",
          label: "44折"
        },
        {
          value: "0.45",
          label: "45折"
        },
        {
          value: "0.46",
          label: "46折"
        },
        {
          value: "0.47",
          label: "47折"
        },
        {
          value: "0.48",
          label: "48折"
        },
        {
          value: "0.5",
          label: "5折"
        },
        {
          value: "0.52",
          label: "52折"
        },
        {
          value: "0.55",
          label: "55折"
        },
        {
          value: "0.6",
          label: "6折"
        },
        {
          value: "0.7",
          label: "7折【配件折扣】"
        },
        {
          value: "0.8",
          label: "8折"
        },
        {
          value: "0.9",
          label: "9折"
        },
        {
          value: "1",
          label: "原价"
        }
      ],
      addressOptions: [
        {
          value: "0",
          label: "无运费"
        },
        {
          value: "0.018",
          label: "Ⅰ：上海【1.8%】"
        },
        {
          value: "0.021",
          label: "Ⅱ：江苏、浙江、安徽【2.1%】"
        },
        {
          value: "0.024",
          label: "Ⅲ：湖北、江西、湖南、河南、山东-济南【2.4%】"
        },
        {
          value: "0.026",
          label: "Ⅳ：北京、天津、福建、山东-青岛【2.6%】"
        },
        {
          value: "0.028",
          label: "Ⅴ：河北、广东、陕西-西安【2.8%】"
        },
        {
          value: "0.03",
          label:
            "Ⅵ：广西、成都、黑龙江-哈尔滨、辽宁-沈阳、吉林-长春、内蒙古-包头、兰州、甘肃-兰州【3%】"
        },
        {
          value: "0.042",
          label: "Ⅶ：云南-昆明、重庆、贵州-贵阳【4.2%】"
        },
        {
          value: "0.05",
          label: "Ⅷ：新疆【5%】"
        }
      ],
      compNameParams: {
        pageNum: 1,
        pageSize: 10,
        compName: undefined,
        isDelete: false,
        isMyCustomer: true
      },
      rules: {
      },
      // 表单参数
      form: {}
    };
  },
  created() {
    this.getList();
    this.getDicts("quote_options").then((response) => {
      this.quote_options = response.data;
    });
  },
  methods: {
    handleUpdate(row) {
      this.isAddMode = false;
      this.isShowDetail = !this.isShowDetail;
      this.priceForm = row;
      this.priceJsonObj = JSON.parse(row.baseJson);
    },
    handleDelete(row) {
      let id = row.id || this.ids;
      this.$confirm(
        '是否确认删除岗位编号为"' + row.projectName + '"的数据项?',
        "警告",
        {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning"
        }
      )
        .then(function() {
          return delKqPriceInfo(id);
        })
        .then(() => {
          this.getList();
          this.msgSuccess("删除成功");
        }).catch(() => {});
    },
    simpleReset() {
      this.priceJsonObj = {
        itemName1: undefined,
        itemName2: undefined,
        itemName3: undefined,
        itemName4: undefined,
        itemName5: undefined,
        itemName6: undefined,
        itemName7: undefined,
        itemName8: undefined,
        itemName9: undefined,
        itemName10: undefined,
        itemName11: undefined,
        itemName12: undefined,
        itemName13: undefined,
        itemName14: undefined,
        itemName15: undefined,
        itemType1: undefined,
        itemType2: undefined,
        itemType3: undefined,
        itemType4: undefined,
        itemType5: undefined,
        itemType6: undefined,
        itemType7: undefined,
        itemType8: undefined,
        itemType9: undefined,
        itemType10: undefined,
        itemType11: undefined,
        itemType12: undefined,
        itemType13: undefined,
        itemType14: undefined,
        itemType15: undefined,
        itemFlow1: undefined,
        itemFlow2: undefined,
        itemFlow3: undefined,
        itemFlow4: undefined,
        itemFlow5: undefined,
        itemFlow6: undefined,
        itemFlow7: undefined,
        itemFlow8: undefined,
        itemFlow9: undefined,
        itemFlow10: undefined,
        itemFlow11: undefined,
        itemFlow12: undefined,
        itemFlow13: undefined,
        itemFlow14: undefined,
        itemFlow15: undefined,
        itemHeight1: undefined,
        itemHeight2: undefined,
        itemHeight3: undefined,
        itemHeight4: undefined,
        itemHeight5: undefined,
        itemHeight6: undefined,
        itemHeight7: undefined,
        itemHeight8: undefined,
        itemHeight9: undefined,
        itemHeight10: undefined,
        itemHeight11: undefined,
        itemHeight12: undefined,
        itemHeight13: undefined,
        itemHeight14: undefined,
        itemHeight15: undefined,
        itemPower1: undefined,
        itemPower2: undefined,
        itemPower3: undefined,
        itemPower4: undefined,
        itemPower5: undefined,
        itemPower6: undefined,
        itemPower7: undefined,
        itemPower8: undefined,
        itemPower9: undefined,
        itemPower10: undefined,
        itemPower11: undefined,
        itemPower12: undefined,
        itemPower13: undefined,
        itemPower14: undefined,
        itemPower15: undefined,
        itemNum1: undefined,
        itemNum2: undefined,
        itemNum3: undefined,
        itemNum4: undefined,
        itemNum5: undefined,
        itemNum6: undefined,
        itemNum7: undefined,
        itemNum8: undefined,
        itemNum9: undefined,
        itemNum10: undefined,
        itemNum11: undefined,
        itemNum12: undefined,
        itemNum13: undefined,
        itemNum14: undefined,
        itemNum15: undefined,
        originalPrice1: undefined,
        originalPrice2: undefined,
        originalPrice3: undefined,
        originalPrice4: undefined,
        originalPrice5: undefined,
        originalPrice6: undefined,
        originalPrice7: undefined,
        originalPrice8: undefined,
        originalPrice9: undefined,
        originalPrice10: undefined,
        originalPrice11: undefined,
        originalPrice12: undefined,
        originalPrice13: undefined,
        originalPrice14: undefined,
        originalPrice15: undefined,
        itemSingle1: undefined,
        itemSingle2: undefined,
        itemSingle3: undefined,
        itemSingle4: undefined,
        itemSingle5: undefined,
        itemSingle6: undefined,
        itemSingle7: undefined,
        itemSingle8: undefined,
        itemSingle9: undefined,
        itemSingle10: undefined,
        itemSingle11: undefined,
        itemSingle12: undefined,
        itemSingle13: undefined,
        itemSingle14: undefined,
        itemSingle15: undefined,
        itemTotal1: undefined,
        itemTotal2: undefined,
        itemTotal3: undefined,
        itemTotal4: undefined,
        itemTotal5: undefined,
        itemTotal6: undefined,
        itemTotal7: undefined,
        itemTotal8: undefined,
        itemTotal9: undefined,
        itemTotal10: undefined,
        itemTotal11: undefined,
        itemTotal12: undefined,
        itemTotal13: undefined,
        itemTotal14: undefined,
        itemTotal15: undefined,
        itemDesc1: undefined,
        itemDesc2: undefined,
        itemDesc3: undefined,
        itemDesc4: undefined,
        itemDesc5: undefined,
        itemDesc6: undefined,
        itemDesc7: undefined,
        itemDesc8: undefined,
        itemDesc9: undefined,
        itemDesc10: undefined,
        itemDesc11: undefined,
        itemDesc12: undefined,
        itemDesc13: undefined,
        itemDesc14: undefined,
        itemDesc15: undefined
      };
      this.priceForm.allItemTotalNum = undefined;
      this.priceForm.allItemChinaNum = undefined;
      this.priceForm.allItemTotalNum670 = undefined;
      this.priceForm.allTransportPrice = undefined;

      this.priceForm.baseJson = undefined;
    },
    handleReset() {
      this.priceJsonObj = {
        itemName1: undefined,
        itemName2: undefined,
        itemName3: undefined,
        itemName4: undefined,
        itemName5: undefined,
        itemName6: undefined,
        itemName7: undefined,
        itemName8: undefined,
        itemName9: undefined,
        itemName10: undefined,
        itemName11: undefined,
        itemName12: undefined,
        itemName13: undefined,
        itemName14: undefined,
        itemName15: undefined,
        itemType1: undefined,
        itemType2: undefined,
        itemType3: undefined,
        itemType4: undefined,
        itemType5: undefined,
        itemType6: undefined,
        itemType7: undefined,
        itemType8: undefined,
        itemType9: undefined,
        itemType10: undefined,
        itemType11: undefined,
        itemType12: undefined,
        itemType13: undefined,
        itemType14: undefined,
        itemType15: undefined,
        itemFlow1: undefined,
        itemFlow2: undefined,
        itemFlow3: undefined,
        itemFlow4: undefined,
        itemFlow5: undefined,
        itemFlow6: undefined,
        itemFlow7: undefined,
        itemFlow8: undefined,
        itemFlow9: undefined,
        itemFlow10: undefined,
        itemFlow11: undefined,
        itemFlow12: undefined,
        itemFlow13: undefined,
        itemFlow14: undefined,
        itemFlow15: undefined,
        itemHeight1: undefined,
        itemHeight2: undefined,
        itemHeight3: undefined,
        itemHeight4: undefined,
        itemHeight5: undefined,
        itemHeight6: undefined,
        itemHeight7: undefined,
        itemHeight8: undefined,
        itemHeight9: undefined,
        itemHeight10: undefined,
        itemHeight11: undefined,
        itemHeight12: undefined,
        itemHeight13: undefined,
        itemHeight14: undefined,
        itemHeight15: undefined,
        itemPower1: undefined,
        itemPower2: undefined,
        itemPower3: undefined,
        itemPower4: undefined,
        itemPower5: undefined,
        itemPower6: undefined,
        itemPower7: undefined,
        itemPower8: undefined,
        itemPower9: undefined,
        itemPower10: undefined,
        itemPower11: undefined,
        itemPower12: undefined,
        itemPower13: undefined,
        itemPower14: undefined,
        itemPower15: undefined,
        itemNum1: undefined,
        itemNum2: undefined,
        itemNum3: undefined,
        itemNum4: undefined,
        itemNum5: undefined,
        itemNum6: undefined,
        itemNum7: undefined,
        itemNum8: undefined,
        itemNum9: undefined,
        itemNum10: undefined,
        itemNum11: undefined,
        itemNum12: undefined,
        itemNum13: undefined,
        itemNum14: undefined,
        itemNum15: undefined,
        originalPrice1: undefined,
        originalPrice2: undefined,
        originalPrice3: undefined,
        originalPrice4: undefined,
        originalPrice5: undefined,
        originalPrice6: undefined,
        originalPrice7: undefined,
        originalPrice8: undefined,
        originalPrice9: undefined,
        originalPrice10: undefined,
        originalPrice11: undefined,
        originalPrice12: undefined,
        originalPrice13: undefined,
        originalPrice14: undefined,
        originalPrice15: undefined,
        itemSingle1: undefined,
        itemSingle2: undefined,
        itemSingle3: undefined,
        itemSingle4: undefined,
        itemSingle5: undefined,
        itemSingle6: undefined,
        itemSingle7: undefined,
        itemSingle8: undefined,
        itemSingle9: undefined,
        itemSingle10: undefined,
        itemSingle11: undefined,
        itemSingle12: undefined,
        itemSingle13: undefined,
        itemSingle14: undefined,
        itemSingle15: undefined,
        itemTotal1: undefined,
        itemTotal2: undefined,
        itemTotal3: undefined,
        itemTotal4: undefined,
        itemTotal5: undefined,
        itemTotal6: undefined,
        itemTotal7: undefined,
        itemTotal8: undefined,
        itemTotal9: undefined,
        itemTotal10: undefined,
        itemTotal11: undefined,
        itemTotal12: undefined,
        itemTotal13: undefined,
        itemTotal14: undefined,
        itemTotal15: undefined,
        itemDesc1: undefined,
        itemDesc2: undefined,
        itemDesc3: undefined,
        itemDesc4: undefined,
        itemDesc5: undefined,
        itemDesc6: undefined,
        itemDesc7: undefined,
        itemDesc8: undefined,
        itemDesc9: undefined,
        itemDesc10: undefined,
        itemDesc11: undefined,
        itemDesc12: undefined,
        itemDesc13: undefined,
        itemDesc14: undefined,
        itemDesc15: undefined
      };
      this.priceForm = {
        kqId: undefined,
        projectName: undefined,
        allItemTotalNum: undefined,
        allItemTotalNum670: undefined,
        allTransportPrice: undefined,
        allItemChinaNum: undefined,
        totalDiscount: undefined,
        dateTime: undefined,
        baseJson: undefined
      };
    },
    handleChangeCompNameFunc(val) {
      const name = this.formatDate(new Date()) + "-" + val + "-报价单";
      this.priceForm.projectName = name;
      this.priceForm.kqId = this.compNameOptions.find(one => one.value == val).id;
    },
    formatDate(date) {
      return [
        date.getFullYear(),
        this.padTo2Digits(date.getMonth() + 1),
        this.padTo2Digits(date.getDate())
      ].join("-");
    },
    padTo2Digits(num) {
      return num.toString().padStart(2, "0");
    },
    /** 查询岗位列表 */
    getList() {
      this.loading = true;
      listKqAllPriceInfos(this.orderParams).then((res) => {
        this.kqAllOrderList = res.data.results;
        this.total = res.data.count;
        this.loading = false;
      });
    },
    handleSaveFunc() {
      const jsonStr = JSON.stringify(this.priceJsonObj);
      this.priceForm.baseJson = jsonStr;
      // addKqPriceInfo
      if (this.isAddMode) {
        addKqPriceInfo(this.priceForm).then((response) => {
          this.msgSuccess("新增成功");
          this.isShowDetail = !this.isShowDetail;
          this.getList();
        });
      } else {
        updateKqPriceInfo(this.priceForm).then((response) => {
          this.msgSuccess("修改成功");
          this.isShowDetail = !this.isShowDetail;
          this.getList();
        });
      }
    },
    handleCalForTech() {
      this.calForTechFunc();
      this.canSave = false;
      this.isBtnDisable = true;
    },
    calForTechFunc() {
      setTimeout(() => {
        this.handleAllItemTotal();
      }, 500);
      const num = Number(this.factor);
      if (!this.priceJsonObj.itemSingle1) return;
      this.priceJsonObj.itemSingle1 = Math.ceil(this.priceJsonObj.itemSingle1 * num);
      this.priceJsonObj.itemTotal1 =
        this.priceJsonObj.itemSingle1 * this.priceJsonObj.itemNum1;
      if (!this.priceJsonObj.itemSingle2) return;
      this.priceJsonObj.itemSingle2 = Math.ceil(this.priceJsonObj.itemSingle2 * num);
      this.priceJsonObj.itemTotal2 =
        this.priceJsonObj.itemSingle2 * this.priceJsonObj.itemNum2;
      if (!this.priceJsonObj.itemSingle3) return;
      this.priceJsonObj.itemSingle3 = Math.ceil(
        this.priceJsonObj.itemSingle3 * num
      );
      this.priceJsonObj.itemTotal3 =
        this.priceJsonObj.itemSingle3 * this.priceJsonObj.itemNum3;
      if (!this.priceJsonObj.itemSingle4) return;
      this.priceJsonObj.itemSingle4 = Math.ceil(this.priceJsonObj.itemSingle4 * num);
      this.priceJsonObj.itemTotal4 =
        this.priceJsonObj.itemSingle4 * this.priceJsonObj.itemNum4;
      if (!this.priceJsonObj.itemSingle5) return;
      this.priceJsonObj.itemSingle5 = Math.ceil(this.priceJsonObj.itemSingle5 * num);
      this.priceJsonObj.itemTotal5 =
        this.priceJsonObj.itemSingle5 * this.priceJsonObj.itemNum5;
      if (!this.priceJsonObj.itemSingle6) return;
      this.priceJsonObj.itemSingle6 = Math.ceil(this.priceJsonObj.itemSingle6 * num);
      this.priceJsonObj.itemTotal6 =
        this.priceJsonObj.itemSingle6 * this.priceJsonObj.itemNum6;
      if (!this.priceJsonObj.itemSingle7) return;
      this.priceJsonObj.itemSingle7 = Math.ceil(this.priceJsonObj.itemSingle7 * num);
      this.priceJsonObj.itemTotal7 =
        this.priceJsonObj.itemSingle7 * this.priceJsonObj.itemNum7;
      if (!this.priceJsonObj.itemSingle8) return;
      this.priceJsonObj.itemSingle8 = Math.ceil(this.priceJsonObj.itemSingle8 * num);
      this.priceJsonObj.itemTotal8 =
        this.priceJsonObj.itemSingle8 * this.priceJsonObj.itemNum8;
      if (!this.priceJsonObj.itemSingle9) return;
      this.priceJsonObj.itemSingle9 = Math.ceil(this.priceJsonObj.itemSingle9 * num);
      this.priceJsonObj.itemTotal9 =
        this.priceJsonObj.itemSingle9 * this.priceJsonObj.itemNum9;
      if (!this.priceJsonObj.itemSingle10) return;
      this.priceJsonObj.itemSingle10 = Math.ceil(
        this.priceJsonObj.itemSingle10 * num
      );
      this.priceJsonObj.itemTotal10 =
        this.priceJsonObj.itemSingle10 * this.priceJsonObj.itemNum10;
      if (!this.priceJsonObj.itemSingle11) return;
      this.priceJsonObj.itemSingle11 = Math.ceil(
        this.priceJsonObj.itemSingle11 * num
      );
      this.priceJsonObj.itemTotal11 =
        this.priceJsonObj.itemSingle11 * this.priceJsonObj.itemNum11;
      if (!this.priceJsonObj.itemSingle12) return;
      this.priceJsonObj.itemSingle12 = Math.ceil(
        this.priceJsonObj.itemSingle12 * num
      );
      this.priceJsonObj.itemTotal12 =
        this.priceJsonObj.itemSingle12 * this.priceJsonObj.itemNum12;
      if (!this.priceJsonObj.itemSingle13) return;
      this.priceJsonObj.itemSingle13 = Math.ceil(
        this.priceJsonObj.itemSingle13 * num
      );
      this.priceJsonObj.itemTotal13 =
        this.priceJsonObj.itemSingle13 * this.priceJsonObj.itemNum13;
      if (!this.priceJsonObj.itemSingle14) return;
      this.priceJsonObj.itemSingle14 = Math.ceil(
        this.priceJsonObj.itemSingle14 * num
      );
      this.priceJsonObj.itemTotal14 =
        this.priceJsonObj.itemSingle14 * this.priceJsonObj.itemNum14;
      if (!this.priceJsonObj.itemSingle15) return;
      this.priceJsonObj.itemSingle15 = Math.ceil(
        this.priceJsonObj.itemSingle15 * num
      );
      this.priceJsonObj.itemTotal15 =
        this.priceJsonObj.itemSingle15 * this.priceJsonObj.itemNum15;
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.orderParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map((item) => item.id);
      this.single = selection.length != 1;
      this.multiple = !selection.length;
    },
    handleAdd() {
      this.isAddMode = true;
      this.handleReset();
      this.isShowDetail = !this.isShowDetail;
    },
    handleback() {
      this.isShowDetail = !this.isShowDetail;
    },
    handleCalc() {
      this.priceForm.dateTime = this.formatDate(new Date());
      this.isBtnDisable = false;
      this.canSave = true;
      setTimeout(() => {
        this.handleAllItemTotal();
      }, 500);
      if (this.showTableNum == 5) {
        this.handleCal5();
      } else if (this.showTableNum == 6) {
        this.handleCal5();
        if (!this.priceJsonObj.originalPrice6) return;
        this.priceJsonObj.itemSingle6 =
          Math.ceil(this.priceJsonObj.originalPrice6 * this.priceForm.totalDiscount);
        this.priceJsonObj.itemTotal6 =
          this.priceJsonObj.itemSingle6 * this.priceJsonObj.itemNum6;
      } else if (this.showTableNum == 7) {
        this.handleCal5();
        if (!this.priceJsonObj.originalPrice6) return;
        this.priceJsonObj.itemSingle6 =
          Math.ceil(this.priceJsonObj.originalPrice6 * this.priceForm.totalDiscount);
        this.priceJsonObj.itemTotal6 =
          this.priceJsonObj.itemSingle6 * this.priceJsonObj.itemNum6;
        if (!this.priceJsonObj.originalPrice7) return;
        this.priceJsonObj.itemSingle7 =
          Math.ceil(this.priceJsonObj.originalPrice7 * this.priceForm.totalDiscount);
        this.priceJsonObj.itemTotal7 =
          this.priceJsonObj.itemSingle7 * this.priceJsonObj.itemNum7;
      } else if (this.showTableNum == 8) {
        this.handleCal5();
        if (!this.priceJsonObj.originalPrice6) return;
        this.priceJsonObj.itemSingle6 =
          Math.ceil(this.priceJsonObj.originalPrice6 * this.priceForm.totalDiscount);
        this.priceJsonObj.itemTotal6 =
          this.priceJsonObj.itemSingle6 * this.priceJsonObj.itemNum6;
        if (!this.priceJsonObj.originalPrice7) return;
        this.priceJsonObj.itemSingle7 =
          Math.ceil(this.priceJsonObj.originalPrice7 * this.priceForm.totalDiscount);
        this.priceJsonObj.itemTotal7 =
          this.priceJsonObj.itemSingle7 * this.priceJsonObj.itemNum7;
        if (!this.priceJsonObj.originalPrice8) return;
        this.priceJsonObj.itemSingle8 =
          Math.ceil(this.priceJsonObj.originalPrice8 * this.priceForm.totalDiscount);
        this.priceJsonObj.itemTotal8 =
          this.priceJsonObj.itemSingle8 * this.priceJsonObj.itemNum8;
      } else if (this.showTableNum == 9) {
        this.handleCal5();
        if (!this.priceJsonObj.originalPrice6) return;
        this.priceJsonObj.itemSingle6 =
          Math.ceil(this.priceJsonObj.originalPrice6 * this.priceForm.totalDiscount);
        this.priceJsonObj.itemTotal6 =
          this.priceJsonObj.itemSingle6 * this.priceJsonObj.itemNum6;
        if (!this.priceJsonObj.originalPrice7) return;
        this.priceJsonObj.itemSingle7 =
          Math.ceil(this.priceJsonObj.originalPrice7 * this.priceForm.totalDiscount);
        this.priceJsonObj.itemTotal7 =
          this.priceJsonObj.itemSingle7 * this.priceJsonObj.itemNum7;
        if (!this.priceJsonObj.originalPrice8) return;
        this.priceJsonObj.itemSingle8 =
          Math.ceil(this.priceJsonObj.originalPrice8 * this.priceForm.totalDiscount);
        this.priceJsonObj.itemTotal8 =
          this.priceJsonObj.itemSingle8 * this.priceJsonObj.itemNum8;
        if (!this.priceJsonObj.originalPrice9) return;
        this.priceJsonObj.itemSingle9 =
          Math.ceil(this.priceJsonObj.originalPrice9 * this.priceForm.totalDiscount);
        this.priceJsonObj.itemTotal9 =
          this.priceJsonObj.itemSingle9 * this.priceJsonObj.itemNum9;
      } else if (this.showTableNum == 10) {
        this.handleCal5();
        if (!this.priceJsonObj.originalPrice6) return;
        this.priceJsonObj.itemSingle6 =
          Math.ceil(this.priceJsonObj.originalPrice6 * this.priceForm.totalDiscount);
        this.priceJsonObj.itemTotal6 =
          this.priceJsonObj.itemSingle6 * this.priceJsonObj.itemNum6;
        if (!this.priceJsonObj.originalPrice7) return;
        this.priceJsonObj.itemSingle7 =
          Math.ceil(this.priceJsonObj.originalPrice7 * this.priceForm.totalDiscount);
        this.priceJsonObj.itemTotal7 =
          this.priceJsonObj.itemSingle7 * this.priceJsonObj.itemNum7;
        if (!this.priceJsonObj.originalPrice8) return;
        this.priceJsonObj.itemSingle8 =
          Math.ceil(this.priceJsonObj.originalPrice8 * this.priceForm.totalDiscount);
        this.priceJsonObj.itemTotal8 =
          this.priceJsonObj.itemSingle8 * this.priceJsonObj.itemNum8;
        if (!this.priceJsonObj.originalPrice9) return;
        this.priceJsonObj.itemSingle9 =
          Math.ceil(this.priceJsonObj.originalPrice9 * this.priceForm.totalDiscount);
        this.priceJsonObj.itemTotal9 =
          this.priceJsonObj.itemSingle9 * this.priceJsonObj.itemNum9;
        if (!this.priceJsonObj.originalPrice10) return;
        this.priceJsonObj.itemSingle10 =
          Math.ceil(this.priceJsonObj.originalPrice10 * this.priceForm.totalDiscount);
        this.priceJsonObj.itemTotal10 =
          this.priceJsonObj.itemSingle10 * this.priceJsonObj.itemNum10;
      } else if (this.showTableNum == 11) {
        this.handleCal5();
        if (!this.priceJsonObj.originalPrice6) return;
        this.priceJsonObj.itemSingle6 =
          Math.ceil(this.priceJsonObj.originalPrice6 * this.priceForm.totalDiscount);
        this.priceJsonObj.itemTotal6 =
          this.priceJsonObj.itemSingle6 * this.priceJsonObj.itemNum6;
        if (!this.priceJsonObj.originalPrice7) return;
        this.priceJsonObj.itemSingle7 =
          Math.ceil(this.priceJsonObj.originalPrice7 * this.priceForm.totalDiscount);
        this.priceJsonObj.itemTotal7 =
          this.priceJsonObj.itemSingle7 * this.priceJsonObj.itemNum7;
        if (!this.priceJsonObj.originalPrice8) return;
        this.priceJsonObj.itemSingle8 =
          Math.ceil(this.priceJsonObj.originalPrice8 * this.priceForm.totalDiscount);
        this.priceJsonObj.itemTotal8 =
          this.priceJsonObj.itemSingle8 * this.priceJsonObj.itemNum8;
        if (!this.priceJsonObj.originalPrice9) return;
        this.priceJsonObj.itemSingle9 =
          Math.ceil(this.priceJsonObj.originalPrice9 * this.priceForm.totalDiscount);
        this.priceJsonObj.itemTotal9 =
          this.priceJsonObj.itemSingle9 * this.priceJsonObj.itemNum9;
        if (!this.priceJsonObj.originalPrice10) return;
        this.priceJsonObj.itemSingle10 =
          Math.ceil(this.priceJsonObj.originalPrice10 * this.priceForm.totalDiscount);
        this.priceJsonObj.itemTotal10 =
          this.priceJsonObj.itemSingle10 * this.priceJsonObj.itemNum10;
        if (!this.priceJsonObj.originalPrice11) return;
        this.priceJsonObj.itemSingle11 =
          Math.ceil(this.priceJsonObj.originalPrice11 * this.priceForm.totalDiscount);
        this.priceJsonObj.itemTotal11 =
          this.priceJsonObj.itemSingle11 * this.priceJsonObj.itemNum11;
      } else if (this.showTableNum == 12) {
        this.handleCal5();
        if (!this.priceJsonObj.originalPrice6) return;
        this.priceJsonObj.itemSingle6 =
          Math.ceil(this.priceJsonObj.originalPrice6 * this.priceForm.totalDiscount);
        this.priceJsonObj.itemTotal6 =
          this.priceJsonObj.itemSingle6 * this.priceJsonObj.itemNum6;
        if (!this.priceJsonObj.originalPrice7) return;
        this.priceJsonObj.itemSingle7 =
          Math.ceil(this.priceJsonObj.originalPrice7 * this.priceForm.totalDiscount);
        this.priceJsonObj.itemTotal7 =
          this.priceJsonObj.itemSingle7 * this.priceJsonObj.itemNum7;
        if (!this.priceJsonObj.originalPrice8) return;
        this.priceJsonObj.itemSingle8 =
          Math.ceil(this.priceJsonObj.originalPrice8 * this.priceForm.totalDiscount);
        this.priceJsonObj.itemTotal8 =
          this.priceJsonObj.itemSingle8 * this.priceJsonObj.itemNum8;
        if (!this.priceJsonObj.originalPrice9) return;
        this.priceJsonObj.itemSingle9 =
          Math.ceil(this.priceJsonObj.originalPrice9 * this.priceForm.totalDiscount);
        this.priceJsonObj.itemTotal9 =
          this.priceJsonObj.itemSingle9 * this.priceJsonObj.itemNum9;
        if (!this.priceJsonObj.originalPrice10) return;
        this.priceJsonObj.itemSingle10 =
          Math.ceil(this.priceJsonObj.originalPrice10 * this.priceForm.totalDiscount);
        this.priceJsonObj.itemTotal10 =
          this.priceJsonObj.itemSingle10 * this.priceJsonObj.itemNum10;
        if (!this.priceJsonObj.originalPrice11) return;
        this.priceJsonObj.itemSingle11 =
          Math.ceil(this.priceJsonObj.originalPrice11 * this.priceForm.totalDiscount);
        this.priceJsonObj.itemTotal11 =
          this.priceJsonObj.itemSingle11 * this.priceJsonObj.itemNum11;
        if (!this.priceJsonObj.originalPrice12) return;
        this.priceJsonObj.itemSingle12 =
          Math.ceil(this.priceJsonObj.originalPrice12 * this.priceForm.totalDiscount);
        this.priceJsonObj.itemTotal12 =
          this.priceJsonObj.itemSingle12 * this.priceJsonObj.itemNum12;
      } else if (this.showTableNum == 13) {
        this.handleCal5();
        if (!this.priceJsonObj.originalPrice6) return;
        this.priceJsonObj.itemSingle6 =
          Math.ceil(this.priceJsonObj.originalPrice6 * this.priceForm.totalDiscount);
        this.priceJsonObj.itemTotal6 =
          this.priceJsonObj.itemSingle6 * this.priceJsonObj.itemNum6;
        if (!this.priceJsonObj.originalPrice7) return;
        this.priceJsonObj.itemSingle7 =
          Math.ceil(this.priceJsonObj.originalPrice7 * this.priceForm.totalDiscount);
        this.priceJsonObj.itemTotal7 =
          this.priceJsonObj.itemSingle7 * this.priceJsonObj.itemNum7;
        if (!this.priceJsonObj.originalPrice8) return;
        this.priceJsonObj.itemSingle8 =
          Math.ceil(this.priceJsonObj.originalPrice8 * this.priceForm.totalDiscount);
        this.priceJsonObj.itemTotal8 =
          this.priceJsonObj.itemSingle8 * this.priceJsonObj.itemNum8;
        if (!this.priceJsonObj.originalPrice9) return;
        this.priceJsonObj.itemSingle9 =
          Math.ceil(this.priceJsonObj.originalPrice9 * this.priceForm.totalDiscount);
        this.priceJsonObj.itemTotal9 =
          this.priceJsonObj.itemSingle9 * this.priceJsonObj.itemNum9;
        if (!this.priceJsonObj.originalPrice10) return;
        this.priceJsonObj.itemSingle10 =
          Math.ceil(this.priceJsonObj.originalPrice10 * this.priceForm.totalDiscount);
        this.priceJsonObj.itemTotal10 =
          this.priceJsonObj.itemSingle10 * this.priceJsonObj.itemNum10;
        if (!this.priceJsonObj.originalPrice11) return;
        this.priceJsonObj.itemSingle11 =
          Math.ceil(this.priceJsonObj.originalPrice11 * this.priceForm.totalDiscount);
        this.priceJsonObj.itemTotal11 =
          this.priceJsonObj.itemSingle11 * this.priceJsonObj.itemNum11;
        if (!this.priceJsonObj.originalPrice12) return;
        this.priceJsonObj.itemSingle12 =
          Math.ceil(this.priceJsonObj.originalPrice12 * this.priceForm.totalDiscount);
        this.priceJsonObj.itemTotal12 =
          this.priceJsonObj.itemSingle12 * this.priceJsonObj.itemNum12;
        if (!this.priceJsonObj.originalPrice13) return;
        this.priceJsonObj.itemSingle13 =
          Math.ceil(this.priceJsonObj.originalPrice13 * this.priceForm.totalDiscount);
        this.priceJsonObj.itemTotal13 =
          this.priceJsonObj.itemSingle13 * this.priceJsonObj.itemNum13;
      } else if (this.showTableNum == 14) {
        this.handleCal5();
        if (!this.priceJsonObj.originalPrice6) return;
        this.priceJsonObj.itemSingle6 =
          Math.ceil(this.priceJsonObj.originalPrice6 * this.priceForm.totalDiscount);
        this.priceJsonObj.itemTotal6 =
          this.priceJsonObj.itemSingle6 * this.priceJsonObj.itemNum6;
        if (!this.priceJsonObj.originalPrice7) return;
        this.priceJsonObj.itemSingle7 =
          Math.ceil(this.priceJsonObj.originalPrice7 * this.priceForm.totalDiscount);
        this.priceJsonObj.itemTotal7 =
          this.priceJsonObj.itemSingle7 * this.priceJsonObj.itemNum7;
        if (!this.priceJsonObj.originalPrice8) return;
        this.priceJsonObj.itemSingle8 =
          Math.ceil(this.priceJsonObj.originalPrice8 * this.priceForm.totalDiscount);
        this.priceJsonObj.itemTotal8 =
          this.priceJsonObj.itemSingle8 * this.priceJsonObj.itemNum8;
        if (!this.priceJsonObj.originalPrice9) return;
        this.priceJsonObj.itemSingle9 =
          Math.ceil(this.priceJsonObj.originalPrice9 * this.priceForm.totalDiscount);
        this.priceJsonObj.itemTotal9 =
          this.priceJsonObj.itemSingle9 * this.priceJsonObj.itemNum9;
        if (!this.priceJsonObj.originalPrice10) return;
        this.priceJsonObj.itemSingle10 =
          Math.ceil(this.priceJsonObj.originalPrice10 * this.priceForm.totalDiscount);
        this.priceJsonObj.itemTotal10 =
          this.priceJsonObj.itemSingle10 * this.priceJsonObj.itemNum10;
        if (!this.priceJsonObj.originalPrice11) return;
        this.priceJsonObj.itemSingle11 =
          Math.ceil(this.priceJsonObj.originalPrice11 * this.priceForm.totalDiscount);
        this.priceJsonObj.itemTotal11 =
          this.priceJsonObj.itemSingle11 * this.priceJsonObj.itemNum11;
        if (!this.priceJsonObj.originalPrice12) return;
        this.priceJsonObj.itemSingle12 =
          Math.ceil(this.priceJsonObj.originalPrice12 * this.priceForm.totalDiscount);
        this.priceJsonObj.itemTotal12 =
          this.priceJsonObj.itemSingle12 * this.priceJsonObj.itemNum12;
        if (!this.priceJsonObj.originalPrice13) return;
        this.priceJsonObj.itemSingle13 =
          Math.ceil(this.priceJsonObj.originalPrice13 * this.priceForm.totalDiscount);
        this.priceJsonObj.itemTotal13 =
          this.priceJsonObj.itemSingle13 * this.priceJsonObj.itemNum13;
        if (!this.priceJsonObj.originalPrice14) return;
        this.priceJsonObj.itemSingle14 =
          Math.ceil(this.priceJsonObj.originalPrice14 * this.priceForm.totalDiscount);
        this.priceJsonObj.itemTotal14 =
          this.priceJsonObj.itemSingle14 * this.priceJsonObj.itemNum14;
      } else if (this.showTableNum == 15) {
        this.handleCal5();
        if (!this.priceJsonObj.originalPrice6) return;
        this.priceJsonObj.itemSingle6 =
          Math.ceil(this.priceJsonObj.originalPrice6 * this.priceForm.totalDiscount);
        this.priceJsonObj.itemTotal6 =
          this.priceJsonObj.itemSingle6 * this.priceJsonObj.itemNum6;
        if (!this.priceJsonObj.originalPrice7) return;
        this.priceJsonObj.itemSingle7 =
          Math.ceil(this.priceJsonObj.originalPrice7 * this.priceForm.totalDiscount);
        this.priceJsonObj.itemTotal7 =
          this.priceJsonObj.itemSingle7 * this.priceJsonObj.itemNum7;
        if (!this.priceJsonObj.originalPrice8) return;
        this.priceJsonObj.itemSingle8 =
          Math.ceil(this.priceJsonObj.originalPrice8 * this.priceForm.totalDiscount);
        this.priceJsonObj.itemTotal8 =
          this.priceJsonObj.itemSingle8 * this.priceJsonObj.itemNum8;
        if (!this.priceJsonObj.originalPrice9) return;
        this.priceJsonObj.itemSingle9 =
          Math.ceil(this.priceJsonObj.originalPrice9 * this.priceForm.totalDiscount);
        this.priceJsonObj.itemTotal9 =
          this.priceJsonObj.itemSingle9 * this.priceJsonObj.itemNum9;
        if (!this.priceJsonObj.originalPrice10) return;
        this.priceJsonObj.itemSingle10 =
          Math.ceil(this.priceJsonObj.originalPrice10 * this.priceForm.totalDiscount);
        this.priceJsonObj.itemTotal10 =
          this.priceJsonObj.itemSingle10 * this.priceJsonObj.itemNum10;
        if (!this.priceJsonObj.originalPrice11) return;
        this.priceJsonObj.itemSingle11 =
          Math.ceil(this.priceJsonObj.originalPrice11 * this.priceForm.totalDiscount);
        this.priceJsonObj.itemTotal11 =
          this.priceJsonObj.itemSingle11 * this.priceJsonObj.itemNum11;
        if (!this.priceJsonObj.originalPrice12) return;
        this.priceJsonObj.itemSingle12 =
          Math.ceil(this.priceJsonObj.originalPrice12 * this.priceForm.totalDiscount);
        this.priceJsonObj.itemTotal12 =
          this.priceJsonObj.itemSingle12 * this.priceJsonObj.itemNum12;
        if (!this.priceJsonObj.originalPrice13) return;
        this.priceJsonObj.itemSingle13 =
          Math.ceil(this.priceJsonObj.originalPrice13 * this.priceForm.totalDiscount);
        this.priceJsonObj.itemTotal13 =
          this.priceJsonObj.itemSingle13 * this.priceJsonObj.itemNum13;
        if (!this.priceJsonObj.originalPrice14) return;
        this.priceJsonObj.itemSingle14 =
          Math.ceil(this.priceJsonObj.originalPrice14 * this.priceForm.totalDiscount);
        this.priceJsonObj.itemTotal14 =
          this.priceJsonObj.itemSingle14 * this.priceJsonObj.itemNum14;
        if (!this.priceJsonObj.originalPrice15) return;
        this.priceJsonObj.itemSingle15 =
          Math.ceil(this.priceJsonObj.originalPrice15 * this.priceForm.totalDiscount);
        this.priceJsonObj.itemTotal15 =
          this.priceJsonObj.itemSingle15 * this.priceJsonObj.itemNum15;
      }
    },
    handleAllItemTotal() {
      const total1 = this.priceJsonObj.itemTotal1 || 0;
      const total2 = this.priceJsonObj.itemTotal2 || 0;
      const total3 = this.priceJsonObj.itemTotal3 || 0;
      const total4 = this.priceJsonObj.itemTotal4 || 0;
      const total5 = this.priceJsonObj.itemTotal5 || 0;
      const total6 = this.priceJsonObj.itemTotal6 || 0;
      const total7 = this.priceJsonObj.itemTotal7 || 0;
      const total8 = this.priceJsonObj.itemTotal8 || 0;
      const total9 = this.priceJsonObj.itemTotal9 || 0;
      const total10 = this.priceJsonObj.itemTotal10 || 0;
      const total11 = this.priceJsonObj.itemTotal11 || 0;
      const total12 = this.priceJsonObj.itemTotal12 || 0;
      const total13 = this.priceJsonObj.itemTotal13 || 0;
      const total14 = this.priceJsonObj.itemTotal14 || 0;
      const total15 = this.priceJsonObj.itemTotal15 || 0;

      this.priceForm.allItemTotalNum670 =
          ((this.priceJsonObj.originalPrice1 || 0) * this.priceJsonObj.itemNum1 || 0) +
          ((this.priceJsonObj.originalPrice2 || 0) * this.priceJsonObj.itemNum2 || 0) +
          ((this.priceJsonObj.originalPrice3 || 0) * this.priceJsonObj.itemNum3 || 0) +
           ((this.priceJsonObj.originalPrice4 || 0) * this.priceJsonObj.itemNum4 || 0) +
            ((this.priceJsonObj.originalPrice5 || 0) * this.priceJsonObj.itemNum5 || 0) +
             ((this.priceJsonObj.originalPrice6 || 0) * this.priceJsonObj.itemNum6 || 0) +
              ((this.priceJsonObj.originalPrice7 || 0) * this.priceJsonObj.itemNum7 || 0) +
               ((this.priceJsonObj.originalPrice8 || 0) * this.priceJsonObj.itemNum8 || 0) +
                ((this.priceJsonObj.originalPrice9 || 0) * this.priceJsonObj.itemNum9 || 0) +
                 ((this.priceJsonObj.originalPrice10 || 0) * this.priceJsonObj.itemNum10 || 0) +
                  ((this.priceJsonObj.originalPrice11 || 0) * this.priceJsonObj.itemNum11 || 0) +
                   ((this.priceJsonObj.originalPrice12 || 0) * this.priceJsonObj.itemNum12 || 0) +
                    ((this.priceJsonObj.originalPrice13 || 0) * this.priceJsonObj.itemNum13 || 0) +
                     ((this.priceJsonObj.originalPrice14 || 0) * this.priceJsonObj.itemNum14 || 0) +
                      ((this.priceJsonObj.originalPrice15 || 0) * this.priceJsonObj.itemNum15 || 0);

      this.priceForm.allTransportPrice = this.priceForm.allItemTotalNum670 * Number(this.priceForm.transDiscount) * 0.5;
      this.priceForm.allItemTotalNum =
        total1 +
        total2 +
        total3 +
        total4 +
        total5 +
        total6 +
        total7 +
        total8 +
        total9 +
        total10 +
        total11 +
        total12 +
        total13 +
        total14 +
        total15;
      this.priceForm.allItemChinaNum = this.toChineseNum(
        this.priceForm.allItemTotalNum
      );
    },
    handleCal5() {
      this.priceJsonObj.itemSingle1 =
        Math.ceil(this.priceJsonObj.originalPrice1 * this.priceForm.totalDiscount);
      this.priceJsonObj.itemTotal1 =
        this.priceJsonObj.itemSingle1 * this.priceJsonObj.itemNum1;

      if (!this.priceJsonObj.originalPrice2) return;
      this.priceJsonObj.itemSingle2 =
        Math.ceil(this.priceJsonObj.originalPrice2 * this.priceForm.totalDiscount);
      this.priceJsonObj.itemTotal2 =
        this.priceJsonObj.itemSingle2 * this.priceJsonObj.itemNum2;
      if (!this.priceJsonObj.originalPrice3) return;
      this.priceJsonObj.itemSingle3 =
        Math.ceil(this.priceJsonObj.originalPrice3 * this.priceForm.totalDiscount);
      this.priceJsonObj.itemTotal3 =
        this.priceJsonObj.itemSingle3 * this.priceJsonObj.itemNum3;
      if (!this.priceJsonObj.originalPrice4) return;
      this.priceJsonObj.itemSingle4 =
        Math.ceil(this.priceJsonObj.originalPrice4 * this.priceForm.totalDiscount);
      this.priceJsonObj.itemTotal4 =
        this.priceJsonObj.itemSingle4 * this.priceJsonObj.itemNum4;
      if (!this.priceJsonObj.originalPrice5) return;
      this.priceJsonObj.itemSingle5 =
        Math.ceil(this.priceJsonObj.originalPrice5 * this.priceForm.totalDiscount);
      this.priceJsonObj.itemTotal5 =
        this.priceJsonObj.itemSingle5 * this.priceJsonObj.itemNum5;
    },
    handleChangeNum(num) {
      if (num == 6) {
        this.isShow6 = true;
        this.isShow7 = false;
        this.isShow8 = false;
        this.isShow9 = false;
        this.isShow10 = false;
        this.isShow11 = false;
        this.isShow12 = false;
        this.isShow13 = false;
        this.isShow14 = false;
        this.isShow15 = false;
      } else if (num == 7) {
        this.isShow6 = true;
        this.isShow7 = true;
        this.isShow8 = false;
        this.isShow9 = false;
        this.isShow10 = false;
        this.isShow11 = false;
        this.isShow12 = false;
        this.isShow13 = false;
        this.isShow14 = false;
        this.isShow15 = false;
      } else if (num == 8) {
        this.isShow6 = true;
        this.isShow7 = true;
        this.isShow8 = true;
        this.isShow9 = false;
        this.isShow10 = false;
        this.isShow11 = false;
        this.isShow12 = false;
        this.isShow13 = false;
        this.isShow14 = false;
        this.isShow15 = false;
      } else if (num == 9) {
        this.isShow6 = true;
        this.isShow7 = true;
        this.isShow8 = true;
        this.isShow9 = true;
        this.isShow10 = false;
        this.isShow11 = false;
        this.isShow12 = false;
        this.isShow13 = false;
        this.isShow14 = false;
        this.isShow15 = false;
      } else if (num == 10) {
        this.isShow6 = true;
        this.isShow7 = true;
        this.isShow8 = true;
        this.isShow9 = true;
        this.isShow10 = true;
        this.isShow11 = false;
        this.isShow12 = false;
        this.isShow13 = false;
        this.isShow14 = false;
        this.isShow15 = false;
      } else if (num == 11) {
        this.isShow6 = true;
        this.isShow7 = true;
        this.isShow8 = true;
        this.isShow9 = true;
        this.isShow10 = true;
        this.isShow11 = true;
        this.isShow12 = false;
        this.isShow13 = false;
        this.isShow14 = false;
        this.isShow15 = false;
      } else if (num == 12) {
        this.isShow6 = true;
        this.isShow7 = true;
        this.isShow8 = true;
        this.isShow9 = true;
        this.isShow10 = true;
        this.isShow11 = true;
        this.isShow12 = true;
        this.isShow13 = false;
        this.isShow14 = false;
        this.isShow15 = false;
      } else if (num == 13) {
        this.isShow6 = true;
        this.isShow7 = true;
        this.isShow8 = true;
        this.isShow9 = true;
        this.isShow10 = true;
        this.isShow11 = true;
        this.isShow12 = true;
        this.isShow13 = true;
        this.isShow14 = false;
        this.isShow15 = false;
      } else if (num == 14) {
        this.isShow6 = true;
        this.isShow7 = true;
        this.isShow8 = true;
        this.isShow9 = true;
        this.isShow10 = true;
        this.isShow11 = true;
        this.isShow12 = true;
        this.isShow13 = true;
        this.isShow14 = true;
        this.isShow15 = false;
      } else if (num == 15) {
        this.isShow6 = true;
        this.isShow7 = true;
        this.isShow8 = true;
        this.isShow9 = true;
        this.isShow10 = true;
        this.isShow11 = true;
        this.isShow12 = true;
        this.isShow13 = true;
        this.isShow14 = true;
        this.isShow15 = true;
      }
    },
    handleDiscountFunc() {
      this.priceForm.totalDiscount =
        Number(this.priceForm.baseDiscount) +
        Number(this.priceForm.transDiscount) * 0.5;
    },
    hideData() {
      this.isHide = !this.isHide;
      this.buttonDesc = this.buttonDesc == "显示670" ? "隐藏670" : "显示670";
    },
    remoteMethod(query) {
      if (query !== "") {
        this.loading = true;
        this.compNameParams.compName = query;
        listKqAllInfos(this.compNameParams).then((res) => {
          this.compNameOptions = [];
          this.kqAllInfoList = res.data.results;
          this.kqAllInfoList.forEach((one) => {
            this.compNameOptions.push({
              id: one.id,
              value: one.compName,
              label: one.compName
            });
          });
        });
      } else {
        this.compNameOptions = [];
      }
    },
    CopyFileUrl(values) {
      const input = document.createElement("input");
      document.body.appendChild(input);
      input.setAttribute("value", values);
      input.select();
      if (document.execCommand("copy")) {
        document.execCommand("copy");
        this.msgSuccess("复制成功");
      }
      document.body.removeChild(input);
    },
    toChineseNum(num) {
      if (isNaN(num)) return "";
      var strPrefix = "";
      if (num < 0) strPrefix = "(负)";
      num = Math.abs(num);
      if (num >= 1000000000000) return "无效数值！";
      var strOutput = "";
      var strUnit = "仟佰拾亿仟佰拾万仟佰拾元角分";
      var strCapDgt = "零壹贰叁肆伍陆柒捌玖";
      num += "00";
      var intPos = num.indexOf(".");
      if (intPos >= 0) {
        num = num.substring(0, intPos) + num.substr(intPos + 1, 2);
      }
      strUnit = strUnit.substr(strUnit.length - num.length);
      for (var i = 0; i < num.length; i++) {
        strOutput +=
          strCapDgt.substr(num.substr(i, 1), 1) + strUnit.substr(i, 1);
      }
      return (
        strPrefix +
        strOutput
          .replace(/零角零分$/, "整")
          .replace(/零[仟佰拾]/g, "零")
          .replace(/零{2,}/g, "零")
          .replace(/零([亿|万])/g, "$1")
          .replace(/零+元/, "元")
          .replace(/亿零{0,3}万/, "亿")
          .replace(/^元/, "零元")
      );
    }
  }
};
</script>
<style rel="stylesheet/scss" lang="scss">
.transfee{
  margin-top: 30px;
}
.transfee2{
  margin-top: 8px;
}
.el-select{
  width:100%;
}
.main {
  margin-left: 3%;
  font-family: Microsoft YaHei;
}
.save_table {
  margin-top: 10px;
  width: 100%;
  display: inline-block;
  text-align: center;
}

.zhouxf {
  .el-input__inner {
     text-align: center;
    font-size: 22px;
    border-left: none;
    border-top: none;
    border-right: none;
    border-bottom: 1px dotted #fff;
    padding:0;
     font-weight: bold;
  }
  input {
    text-align: left;
    caret-color: red;
    font-size: 20px;
    color: #000;
    font-weight: bold;
  }
}
.compName {
  width: 20%;
  font-size: 14px;
  .el-input__inner {
    font-size: 14px;
    border-left: none;
    border-top: none;
    border-right: none;
    border-bottom: 0.5px dotted #fff;
    font-weight: bold;
    padding:0;
  }
  input {
    text-align: left;
    caret-color: red;
    font-size: 20px;
    color: #000;
  }
}
.price_desc {
  margin-top: 8px;
  font-size: 10px;
}
.thanks {
  margin-left: 20px;
  margin-top:0px;
  font-size: 14px;
  font-weight: bold;
}
.price_last {
  border-right: 1px solid;
}
.price_form {
  font-size: 10px;
  text-align: center;
   font-size: 15px;
  .el-col {
    border-top: 1px solid;
    border-left: 1px solid;
    border-bottom: 1px solid;
    padding: 5px;
    height: 40px;

    background-color: #d3d3d3;
     line-height: 34px;
     font-weight: bold;
  }
}
.bottom_table {
  font-size: 14px;
  text-align: left;
  margin-top: 8px;
   .el-input__inner {
    border: none;
   height: 20px;
    line-height: 20px;
    padding: 9px 0;
  }
}

.total_table {
  font-size: 15px;
  text-align: center;
  font-weight: bold;
  .el-col {
    border-left: 1px solid;
    border-bottom: 1px solid;
    height: 50px;
      line-height: 40px;
    padding: 6px;
  }
  .hideCol{
  border-left: 0;
}
  .el-input__inner {
    border: none;
     height: 40px;
    line-height: 40px;
    padding: 0;
    font-size: 16px;
    color:#000;
    font-weight: bold;
    text-align: center;
  }
}
.price_table {
  font-size: 8px;
  text-align: center;
  .el-col {
    border-left: 1px solid;
    border-bottom: 1px solid;
    height: 35px;
    padding: 6px;
    line-height: 25px;

  }
  .el-input__inner {
    border: none;
     font-size: 8px;
    height: 20px;
    line-height: 20px;
    padding: 0;
    color: #000;
    font-weight: bold;
  }
  input::-ms-input-placeholder {
    text-align: center;
  }
  input::-webkit-input-placeholder {
    text-align: center;
  }
  input {
    text-align: center;
    caret-color: red;
  }
}
.timeStyle{

  .el-input__inner {
    text-align: left;
     font-size: 14px;
    height: 14px;
    line-height: 10px;
     padding: 0;
     color: #000;
  }
}
</style>
